import 'package:flutter/material.dart';

// 点击
class UiTap extends StatelessWidget {
  final Widget? child;
  final HitTestBehavior behavior;
  final Function()? onTap;
  final Function()? onDoubleTap;
  final Function()? onLongPress;
  const UiTap({
    super.key,
    this.child,
    this.behavior = HitTestBehavior.opaque,
    this.onTap,
    this.onDoubleTap,
    this.onLongPress,
  });
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      behavior: behavior,
      onTap: onTap,
      onDoubleTap: onDoubleTap,
      onLongPress: onLongPress,
      child: child,
    );
  }
}
